From: Giuseppe Scrivano Date: Tue, 12 May 2015 08:06:56 +0000 (+0200) Subject: ostree-repo-pull: add option to disable static-deltas X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~727 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f6d16a6d9549fc837e18e0787f76713cda94f833;p=ostree.git ostree-repo-pull: add option to disable static-deltas Signed-off-by: Giuseppe Scrivano --- diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c index 66b789fb..175e3120 100644 --- a/src/libostree/ostree-repo-pull.c +++ b/src/libostree/ostree-repo-pull.c @@ -1629,6 +1629,7 @@ ostree_repo_pull_with_options (OstreeRepo *self, char **refs_to_fetch = NULL; GSource *update_timeout = NULL; GSource *idle_src; + gboolean disable_static_deltas = FALSE; if (options) { @@ -1640,6 +1641,7 @@ ostree_repo_pull_with_options (OstreeRepo *self, (void) g_variant_lookup (options, "subdir", "&s", &dir_to_pull); (void) g_variant_lookup (options, "override-remote-name", "s", &pull_data->remote_name); (void) g_variant_lookup (options, "depth", "i", &pull_data->maxdepth); + (void) g_variant_lookup (options, "disable-static-deltas", "b", &disable_static_deltas); } g_return_val_if_fail (pull_data->maxdepth >= -1, FALSE); @@ -2095,7 +2097,7 @@ ostree_repo_pull_with_options (OstreeRepo *self, goto out; #ifdef BUILDOPT_STATIC_DELTAS - if (from_revision == NULL || g_strcmp0 (from_revision, to_revision) != 0) + if (!disable_static_deltas && (from_revision == NULL || g_strcmp0 (from_revision, to_revision) != 0)) { if (!request_static_delta_superblock_sync (pull_data, from_revision, to_revision, &delta_superblock, cancellable, error))